home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AEMail 2.40
/
AEMail v2.40.iso
/
arexx
/
subscribe.aem
< prev
next >
Wrap
Text File
|
1999-03-24
|
977b
|
43 lines
/* Subscribe/Unsubscribe AREXX */
OPTIONS RESULTS
TRACE ALL
ADDRESS AEMAIL1
FOLDER LIST_FOLDERS
fldrlst = RESULT
DO WHILE fldrlst ~= ""
PARSE VAR fldrlst fldr fldrlst
ADDRESS_BOOK GET fldr TYPE
IF (RESULT = 1) THEN DO
FOLDER fldr
FIRST NEW
HaveMsg = RESULT
DO WHILE HaveMsg = 1
REPLYTO
IF (RESULT) = "" THEN FROM
email = RESULT
EXTRACT USERID "'"email"'"
email = RESULT
SAVE TEXT
msg = RESULT
PARSE UPPER VAR msg bgn 'SUBSCRIBE ' listname
un = ""
len = LENGTH(bgn)-1
IF (len > 0) THEN
un = SUBSTR(bgn, len)
IF (un = "UN") THEN
ADDRESS_BOOK DELETE FROM GROUP fldr email
ELSE
ADDRESS_BOOK ADD TO GROUP fldr email
MESSAGE READ
NEXT NEW
HaveMsg = RESULT
END
END
END